|
Reo〔Farhad Arbab: (Reo: a channel-based coordination model for component composition ). Mathematical Structures in Computer Science 14(3):329--366, 2004.〕〔Farhad Arbab: (Puff, The Magic Protocol ). In Gul Agha, Olivier Danvy, Jose Meseguer, editors, Talcott Festschrift, volume 7000 of LNCS, pages 169-206. Springer, 2011.〕 is a domain-specific language for programming and analyzing coordination protocols that compose individual ''processes'' into full ''systems'', broadly construed. Examples of classes of systems that can be composed with Reo include component-based systems, service-oriented systems, multithreading systems, biological systems, and cryptographic protocols. Reo has a graphical syntax in which every Reo program, called a ''connector'' or ''circuit'', is a labeled directed hypergraph. Such a graph represents the data-flow among the processes in the system. Reo has formal semantics, which stand at the basis of its various formal verification techniques and compilation tools. == Definitions == In Reo, a concurrent system consists of a set of components which are glued together by a circuit that enables flow of data between components. Components can perform I/O operations on the ''boundary nodes'' of the circuit to which they are connected. There are two kinds of I/O operations: put-requests dispatch data items to a node, and get-requests fetch data items from a node. All I/O operations are blocking, which means that a component can proceed only after its pending I/O operation has been successfully processed. The figure on the top-right shows an example of a producers-consumer system with three components: two producers on the left and one consumer on the right. The circuit in the middle defines the protocol, which states that the producers should send data synchronously, while the consumer receives those data in alternating order. Formally, the structure of a circuit is defined as follows: Definition 1. A ''circuit'' is a triple where: # is a set of ''nodes''; # is a set of ''boundary nodes''; # is a set of ''channels''; # assigns a ''types'' to every channel. such that , for all . If is a channel, then is called the set of input nodes of and is called the set of output nodes of . The dynamics of a circuit resemble the flow of signals through an electronic circuit. Nodes have fixed merger-replicator behavior: the data of one of the incoming channels is propagated to all outgoing channels, without storing or altering the data (i.e., replicator behavior). If multiple incoming channels can provide data, the node makes a nondeterministic choice among them (i.e., merger behavior). Nodes with only incoming or outgoing channels are called ''sink nodes'' or ''source nodes'', respectively; nodes with both incoming and outgoing channels are called ''mixed nodes''. In contrast to nodes, channels have user-defined behavior represented by their type. This means that channels may store or alter data items that flow through them. Although every channel connects exactly two nodes, these nodes need not to be input and output. For instance, the vertical channel in the figure on the top-right has two inputs and no outputs. The channel type defines the behavior of the channel with respect to data. Below is a list of common types: * Sync: Atomically gets data from its input node and propagates it to its output node. * LossySync: Same as Sync, but can lose data if its output node is not ready to take data. * Fifo: Gets data from its input node, temporarily stores it in an internal buffer of size , and propagates it to its output node (whenever this output node is ready to take data). * SyncDrain: Atomically gets data from both its input nodes and loses it. * Filter: Atomically gets data from its input node and propagates it to its output node if the filter condition is satified; loses the data otherwise. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Reo Coordination Language」の詳細全文を読む スポンサード リンク
|